package com.cmict.data.system.dal.mysql.portal;

import com.cmict.data.framework.common.pojo.PageResult;
import com.cmict.data.framework.mybatis.core.mapper.BaseMapperX;
import com.cmict.data.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.cmict.data.system.controller.admin.portal.vo.PortalPageReqVO;
import com.cmict.data.system.dal.dataobject.portal.PortalVersionDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 门户 Mapper
 *
 * @author awesome
 */
@Mapper
public interface PortalVersionMapper extends BaseMapperX<PortalVersionDO> {

    default PageResult<PortalVersionDO> selectPage(PortalPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<PortalVersionDO>()
                .eqIfPresent(PortalVersionDO::getMoveId, reqVO.getMoveId())
                .orderByDesc(PortalVersionDO::getId));
    }
}
